package com.jzo2o.market.controller.consumer;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.market.model.dto.request.CouponConsumerReqDTO;
import com.jzo2o.market.model.dto.response.CouponInfoResDTO;
import com.jzo2o.market.service.ICouponService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 用户优惠券处理控制器
 *
 * @Author mr.fu
 * @Date 2025/2/8 16:09
 */
@RestController("consumerCouponController")
@RequestMapping("/consumer/coupon")
@Api(tags = "用户优惠券处理类")
public class CouponController {

    @Autowired
    private ICouponService couponService;

    @GetMapping("/my")
    @ApiOperation("查询自己领取的优惠券")
    public List<CouponInfoResDTO> pageCouponList(CouponConsumerReqDTO dto) {
      return   couponService.pageCouponList(dto);
    }
}
